import { reqAddressInfo, reqOrderInfo } from '@/api'
const state = {
    address:[],
    order:{}
}
const mutations = {
    AddressInfo(state,val){
        state.address=val
    },
    OrderInfo(state,val){
        state.order=val
    }
}
const actions = {
    async AddressInfo({ commit }) {
        let result = await reqAddressInfo()
        if (result.code == 200) {
            commit('AddressInfo', result.data)
        }
    },
    async OrderInfo({ commit }) {
        let result = await reqOrderInfo()
        if (result.code == 200) {
            commit('OrderInfo', result.data)
        }
    },
}
const getters = {
}
export default {
    state,
    mutations,
    actions,
    getters
}